<%@ page title="" language="C#" masterpagefile="~/RealtimeSite.master" autoeventwireup="true" inherits="LeaveBalance_Entry, App_Web_kim3uyhp" %>




<%@ Register   Assembly="AjaxControlToolkit"
    Namespace="AjaxControlToolkit"
    TagPrefix="AjaxControlToolkit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
 <link href="css/googleapis.css" rel="stylesheet" type="text/css" />
    <style type="text/css">

#MainContent_FewCompany
{
    position: relative;
    top: 2px;
}
        .textbox
        {}
        .btnRt003366
        {}
        .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: .05rem 0rem;
    /* margin-bottom: 1rem; */
    list-style: none;
    background-color: #fff !important;
    border-radius: .25rem;
    color: #E15C11;
    font-size: 18px;
    font-weight: 500;
}
           .card [class*=card-header-]:not(.card-header-icon):not(.card-header-text):not(.card-header-image) {
    border-radius: 3px;
      margin-top: -37px;
    padding: 7px !important;
}

.grid-lable {
    height: 150px;
    overflow-y: scroll;
    border: 1px solid #ddd;
    margin-left: -10px;
    margin-right: -10px;
    padding: 6px;
}

.grid-lable span {
   font-size: 15px !important;
    line-height: 1.02857 !important;
    color: #333 !important;
    font-weight: 200 !important;
    padding-left: 7px !important;
    padding-top: -3px !important;
    position: relative !important;
    top: -3px !important;
}
.grid-lable1 span {
      font-size: 14px !important;
    line-height: 1.42857 !important;
    color: #333 !important;
    font-weight: 600 !important;
    padding-left: 7px !important;
    padding-top: -3px !important;
    position: relative !important;
    top: -3px !important;
}

#MainContent_FewCompany
{
    margin-left: -7px;
}
#MainContent_Label1
{
     font-size:13px !important;
    font-weight:bold;
}
#MainContent_Label3
{
     font-size:13px;
    font-weight:bold;
}
#MainContent_Label4
{
     font-size:13px;
    font-weight:bold;   
}
#MainContent_Label5
{
     font-size:13px;
    font-weight:bold; 
}
#MainContent_Label6
{
      font-size:13px;
    font-weight:bold; }
#MainContent_Label8
{
         font-size:13px;
    font-weight:bold; 
}
#MainContent_lblLeaveOpeningEntry
{
    font-size: 15px;
    font-weight: 600;
}
#MainContent_lblselectioncriteria
{
     font-size: 15px;
    font-weight: 600;
}
#MainContent_lblYearName
{
        font-size: 13px !important;
    font-weight: bold;
}
#inputSearch
{
        height: 21px;
    margin-top: 5px;
    margin-bottom: 8px;
    width: 100%;
}
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <script type="text/javascript">
        function validate() {
            var txtComname = document.getElementById("<%= txtyear.ClientID %>").value;
            if (txtComname == "") {
                alert("Please Enter Year Name");
                document.getElementById("<%= txtyear.ClientID %>").focus();
                return false;
            }
            var txtComname = document.getElementById("<%= txt1.ClientID %>").value;
            if (txtComname == "") {
                alert("Please Enter Check Input");
                document.getElementById("<%= txt1.ClientID %>").focus();
                return false;
            }
            var txtComname = document.getElementById("<%= txt2.ClientID %>").value;
            if (txtComname == "") {
                alert("Please Enter Check Input");
                document.getElementById("<%= txt2.ClientID %>").focus();
                return false;
            }
            var txtComname = document.getElementById("<%= txt3.ClientID %>").value;
            if (txtComname == "") {
                alert("Please Enter Check Input");
                document.getElementById("<%= txt3.ClientID %>").focus();
                return false;
            }
            var txtComname = document.getElementById("<%= txt4.ClientID %>").value;
            if (txtComname == "") {
                alert("Please Enter Check Input");
                document.getElementById("<%= txt4.ClientID %>").focus();
                return false;
            }
            var txtComname = document.getElementById("<%= txt5.ClientID %>").value;
            if (txtComname == "") {
                alert("Please Enter Check Input");
                document.getElementById("<%= txt5.ClientID %>").focus();
                return false;
            }
            var txtComname = document.getElementById("<%= txt6.ClientID %>").value;
            if (txtComname == "") {
                alert("Please Enter Check Input");
                document.getElementById("<%= txt6.ClientID %>").focus();
                return false;
            }

            return true;
        }

       
        function validate() {
            var dec = document.form.num.value;
            if (dec == "") {
                alert("Please enter.");
                form.num.focus();
                return false;
            }
            if (isDecimal(dec) == false) {
                num = "";
                form.num.focus();
                return false;
            }
            return true;
        }


        function validateFloatKeyPress(el, evt) {
            var charCode = (evt.which) ? evt.which : event.keyCode;

            if (charCode != 46 && charCode > 31 && (charCode < 48 || charCode > 57)) {
                return false;
            }

            if (charCode == 46 && el.value.indexOf(".") !== -1) {
                return false;
            }

            if (el.value.indexOf(".") !== -1) {
                var range = document.selection.createRange();

                if (range.text != "") {
                }
                else {
                    var number = el.value.split('.');
                    if (number.length == 2 && number[1].length > 1)
                        return false;
                }
            }

            return true;
        }




        function numberOnlyExample() {
            if ((event.keyCode < 48) || (event.keyCode > 57) &&  event.keyCode != 110)
                return false;
        }
        function chan() {
            if ((event.keyCode < 46) || (event.keyCode > 57) || (event.keyCode == 47))
                return false;
        }
</script>
     <div class="main-panel">
        <div class="content">
        <div class="container" id="Leavebalance" runat="server">
      
        <div class="row dash-pane2">	

        <div class="card">
                <div class="card-header card-header-warning">
                  <h4 class="card-title"><i class="fa fa-edit fa-fw"></i><asp:Label ID="lblAddEditLeaveOpeningEntry" runat="server" Text="Add/Edit Leave Opening Entry"></asp:Label></h4>
              
                </div>
                <div class="card-body table-responsive">
                <div class="row breadcrumb">
                <b><asp:Label ID="lblLeaveOpeningEntry" runat="server" Text="Leave Opening Entry"></asp:Label> </b>
                </div>
       
                <div class="row">
                <div class="col-md-2">
                <asp:Label ID="lblYearName" runat="server" Text="Year Name" Visible="True"></asp:Label> 
							  <%-- <input class="form-control" />--%>
                   <asp:TextBox ID="txtyear" runat="server" class="form-control"
                    onKeyPress="return numberOnlyExample();" Visible="true" ></asp:TextBox>
                </div>
                    <div class="col-md-2">
								<%--Holiday Date *
							<input class="form-control" />--%>
                             <asp:Label ID="Label1" runat="server"
                Visible="False"></asp:Label>
                   

                 <asp:TextBox ID="txt1" runat="server" Visible="False" class="form-control" 
                onKeyPress="return validateFloatKeyPress(this,event);">0</asp:TextBox>

							  </div>							   
							    <div class="col-md-2">
								<%--Description
							    <input class="form-control" />	--%>
                                 <asp:Label ID="Label3" runat="server" 
                    Visible="False"></asp:Label>	
                                <asp:TextBox ID="txt2" runat="server" Visible="False" class="form-control" 
                        onKeyPress="return validateFloatKeyPress(this,event);"  
                        ontextchanged="txt2_TextChanged" >0</asp:TextBox>
                                				    
							   </div> 
                               <div class="col-md-2">
                                <asp:Label ID="Label4" runat="server" Visible="False" 
          ></asp:Label>
                               <asp:TextBox ID="txt3" runat="server" ontextchanged="txt3_TextChanged" class="form-control"
                    Visible="False" onKeyPress="return validateFloatKeyPress(this,event);"  >0</asp:TextBox>
                               </div>
                               <div class="col-md-2">
                                <asp:Label ID="Label5" runat="server" Visible="False" 
         ></asp:Label>
                               <asp:TextBox ID="txt4" runat="server"   Visible="False" onKeyPress="return validateFloatKeyPress(this,event);"  class="form-control"
                    >0</asp:TextBox>
                               </div>
                               <div class="col-md-2">
                                <asp:Label ID="Label6" runat="server" Visible="False" 
       ></asp:Label>
                               <asp:TextBox ID="txt5" runat="server"   Visible="False" onKeyPress="return validateFloatKeyPress(this,event);"  class="form-control" >0</asp:TextBox>
                               </div>
                               <div  class="col-md-2">
                                <asp:Label ID="Label8" runat="server" Visible="False" 
         ></asp:Label>
                               <asp:TextBox ID="txt6" runat="server"   Visible="False" onKeyPress="return validateFloatKeyPress(this,event);"  class="form-control" >0</asp:TextBox>
                               </div>
                </div>
                <div class="row breadcrumb">
                <b><asp:Label ID="lblselectioncriteria" runat="server" Text="selection criteria"></asp:Label></b>
                </div>
                <div class="row" style="margin-top:-20px;">
             
                               <asp:UpdatePanel ID="UpdatePanel1" runat="server">
   
    <ContentTemplate>

                
                </div>
                <div class="row" style="margin-left:10px; margin-right:10px; margin-top:0px; width:100%">
                <ul class="list-inline" style="width:100%; display:contents">
                <li style="width:17.5%; margin-left:15px;">
                <div class="grid-lable2" style="margin-left:-11px; margin-bottom:5px;">
                                <asp:RadioButton ID="SelectAllCommany" runat="server" Text="" 
             GroupName="Cmpny"  Checked="True" EnableTheming="True" 
                                      oncheckedchanged="SelectAllCommany_CheckedChanged" /><asp:Label ID="lblAllCompany" runat="server" Text="All Company"></asp:Label><br />
             <asp:RadioButton ID="FewCompany" runat="server" Text=""
             GroupName="Cmpny" Font-Bold="False" /><asp:Label ID="lblFewCompany" runat="server" Text="Few Company"></asp:Label>
                </div>
                       <div class="grid-lable">            
                    <asp:CheckBoxList ID="chkcompanylist" runat="server" AutoPostBack="True" Font-Size="12px"
                                         
                                          onselectedindexchanged="chkcompanylist_SelectedIndexChanged">
                                      </asp:CheckBoxList>
					</div>                
                </li>
                <li style="width:17.5%; margin-left:27px;">
                <div class="grid-lable2" style="margin-left:-11px; margin-bottom:5px;">
                             <asp:RadioButton ID="Allshift" runat="server" GroupName="shift1" 
                     Text=""  Checked="True" AutoPostBack="True" 
                     oncheckedchanged="Allshift_CheckedChanged" /><asp:Label ID="lblAllBranch" runat="server" Text="All  Branch"></asp:Label><br />
                     <asp:RadioButton ID="Allshift1" runat="server" GroupName="shift1" 
                    
                    Text=""  AutoPostBack="True" /><asp:Label ID="lblFewBranch" runat="server" Text="Few Branch"></asp:Label><br />
                </div>
                  <div class="grid-lable">    
                    <asp:CheckBoxList ID="Chkshiftlist" runat="server" AutoPostBack="True" Font-Size="12px"
                                          
                                            onselectedindexchanged="Chkshiftlist_SelectedIndexChanged">
                                        </asp:CheckBoxList><br />
                                         
							  </div>
                </li>
                <li style="width:17.5%; margin-left:27px;">
                <div class="grid-lable2" style="margin-left:-11px; margin-bottom:5px;">
                                   <asp:RadioButton ID="AllDesignation" runat="server" Checked="True" GroupName="Dept" 
                Text="" oncheckedchanged="AllDesignation_CheckedChanged" /><asp:Label ID="lblAllDepartment" runat="server" Text="All Department "></asp:Label><br />
                 <asp:RadioButton ID="optfewDesignation" runat="server"  
                    GroupName="Dept" Text=""  
                    oncheckedchanged="optfewdept_CheckedChanged" /><asp:Label ID="lblFewDepartment" runat="server" Text="Few Department"></asp:Label><br /> 
                </div>
                     <div class="grid-lable">
                     <asp:CheckBoxList ID="chkdepartmentlist" runat="server" AutoPostBack="True" Font-Size="12px"   onselectedindexchanged="chkdepartmentlist_SelectedIndexChanged">
                                      </asp:CheckBoxList>
							  </div>
                </li>
                <li style="width:17.5%; margin-left:27px;">
                <div class="grid-lable2" style="margin-left:-11px; margin-bottom:5px;">
                                  <asp:RadioButton ID="RadioButton1" runat="server" Checked="True" GroupName="Desig" 
                Text="" oncheckedchanged="RadioButton1_CheckedChanged"
                 /><asp:Label ID="lblAllDesignation" runat="server" Text=" All  Designation"></asp:Label><br />
                 <asp:RadioButton ID="optFewEmployee0" runat="server" AutoPostBack="True" 
                        GroupName="Desig" oncheckedchanged="optAllemployee_CheckedChanged" 
                        Text=""  /><asp:Label ID="lblFewDesignation" runat="server" Text="Few Designation"></asp:Label><br />           
                </div>
                          <div class="grid-lable">
                         <asp:CheckBoxList ID="ChkDesignationList" runat="server" AutoPostBack="True" Font-Size="12px"
                                           onselectedindexchanged="ChkDesignationList_SelectedIndexChanged">
                                       </asp:CheckBoxList>
							  </div>
                </li>
                <li style="width:17.5%; margin-left:27px;">
                 <div class="grid-lable2" style="margin-left:-11px; margin-bottom:5px;">
                                 <asp:RadioButton ID="optAllemployee" runat="server" AutoPostBack="True" 
                    Checked="True" GroupName="Emp" 
                    oncheckedchanged="optAllemployee_CheckedChanged" Text="" 
                    /><asp:Label ID="lblAllemployee" runat="server" Text="All  employee"></asp:Label><br />
                    <asp:RadioButton ID="optFewEmployee" runat="server" AutoPostBack="True" 
                        GroupName="Emp" 
                        Text="" 
                        oncheckedchanged="optFewEmployee_CheckedChanged" /><asp:Label ID="lblFewEmployee" runat="server" Text=" Few Employee"></asp:Label><br />              
                 </div>
  							    <div class="grid-lable">
                                  <asp:TextBox runat="server" ID="inputSearch" ClientIDMode="Static"  Height="21px" placeholder="Search employee" CssClass="form-control"/>

                         <asp:CheckBoxList ID="chkemployeelist" runat="server"  onselectedindexchanged="chkemployeelist_SelectedIndexChanged" Font-Size="12px" ClientIDMode="Static" >
                                      </asp:CheckBoxList>

                                        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

                                   
                  <script type="text/javascript">
                      $(document).ready(function () {
                          $("#inputSearch").on("keyup", function () {
                              var value = $(this).val().toLowerCase();
                              $("#chkemployeelist tr").filter(function () {
                                  $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
                              });
                          });
                      });
                      window.onload = function () {
                          var tmr = false;

                          var labels = document.getElementById('chkemployeelist').getElementsByTagName('label');
                          var func = function () {
                              if (tmr)
                                  clearTimeout(tmr);
                              tmr = setTimeout(function () {
                                  var regx = new RegExp(document.getElementById('inputSearch').value);


                                  for (var i = 0, size = labels.length; i < size; i++)
                                      if (document.getElementById('inputSearch').value.length > 0) {
                                          if (labels[i].textContent.match(regx)) setItemVisibility(i, true);
                                          else setItemVisibility(i, false);
                                      }
                                      else
                                          setItemVisibility(i, true);
                              }, 500);

                              function setItemVisibility(position, visible) {
                                  if (visible) {
                                      labels[position].style.display = '';
                                      labels[position].previousSibling.style.display = '';
                                      if (labels[position].nextSibling != null)
                                          labels[position].nextSibling.style.display = '';
                                  }
                                  else {
                                      labels[position].style.display = 'none';
                                      labels[position].previousSibling.style.display = 'none';
                                      if (labels[position].nextSibling != null)
                                          labels[position].nextSibling.style.display = 'none';

                                  }
                              }
                          }

                          if (document.attachEvent) document.getElementById('inputSearch').attachEvent('onkeypress', func);  // IE compatibility
                          else document.getElementById('inputSearch').addEventListener('keydown', func, false); // other browsers
                      };


                      function sharad() {
                          var tmr = false;

                          var labels = document.getElementById('chkemployeelist').getElementsByTagName('label');
                          var func = function () {
                              if (tmr)
                                  clearTimeout(tmr);
                              tmr = setTimeout(function () {
                                  var regx = new RegExp(document.getElementById('inputSearch').value);


                                  for (var i = 0, size = labels.length; i < size; i++)
                                      if (document.getElementById('inputSearch').value.length > 0) {
                                          if (labels[i].textContent.match(regx)) setItemVisibility(i, true);
                                          else setItemVisibility(i, false);
                                      }
                                      else
                                          setItemVisibility(i, true);
                              }, 500);

                              function setItemVisibility(position, visible) {
                                  if (visible) {
                                      labels[position].style.display = '';
                                      labels[position].previousSibling.style.display = '';
                                      if (labels[position].nextSibling != null)
                                          labels[position].nextSibling.style.display = '';
                                  }
                                  else {
                                      labels[position].style.display = 'none';
                                      labels[position].previousSibling.style.display = 'none';
                                      if (labels[position].nextSibling != null)
                                          labels[position].nextSibling.style.display = 'none';

                                  }
                              }
                          }

                          if (document.attachEvent) document.getElementById('inputSearch').attachEvent('onkeypress', func);  // IE compatibility
                          else document.getElementById('inputSearch').addEventListener('keydown', func, false); // other browsers
                      }
  </script>
                    
                    </div>              
                </li>

              <%-- <li style="width:15%; margin-left:27px;">

               <div class="grid-lable2" style="margin-left:-11px; margin-bottom:5px;">
                <asp:RadioButton ID="rblSearch" runat="server" AutoPostBack="True" Checked="false" oncheckedchanged="rblSearch_CheckedChanged" Text="Search" />

                 <div class="grid-lable">
                         <asp:CheckBoxList ID="chklist" runat="server" Font-Size="12px"></asp:CheckBoxList>
                    </div>        
                </div>
                </li>--%>
                </ul>
 
                       </ContentTemplate>

   </asp:UpdatePanel> 
                </div>
                <div class="row" style="margin-left:auto; margin-right:auto; display:table; margin-top:20px;">
                                           <asp:Button ID="cmdchangeshift" runat="server" Text="Save"  OnClick="cmdsave_Click" onclientclick="return validate()"
        type="button" class="btn btn-success " /><i class="fa fa-plus;"></i>&nbsp;&nbsp;
        <asp:Button ID="cmdcancel" runat="server" type="button" Text="Cancel" onclick="cmdcancel_Click" 
           class="btn btn-danger"
           /><i  class="fa fa-trash-o;"></i>
                </div>
                </div>
              </div>
			
				</div>
      
            </div></div></div>

            

 <script src="js/jquery-1.8.3.min.js"
       type="text/javascript"></script>

          
</asp:Content>

